package com.atguigu.service.eud_teacher.edu_subject.controller;

import com.atguigu.commonutils.R;
import com.atguigu.service.eud_teacher.edu_subject.entity.CrmBannerEntity;
import com.atguigu.service.eud_teacher.edu_subject.service.CrmBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author: Administrator
 * @date: 2021-04-10 18:33
 */
@RestController
@RequestMapping("/edu_banner/crmuserbanner")
@CrossOrigin
@Api(tags = "--前台幻灯篇管理接口API")
public class CrmUserBannerController {

    @Autowired
    private CrmBannerService crmBannerService;

    @ApiOperation(value = "获取首页banner")
    @GetMapping("/getAllBanner")
    public R index() {
        List<CrmBannerEntity> list = crmBannerService.selectIndexList();
        return R.ok().data("bannerList", list);
    }
}
